package com.google.code.rsser.dao.hibernate;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.google.code.rsser.dao.EntryDAO;
import com.google.code.rsser.model.Entry;
import com.google.code.rsser.model.User;

@Repository("entryDAO")
public class HibernateEntryDAO extends AbstractGenericHibernateDAO<Entry> implements EntryDAO {

	@SuppressWarnings("unchecked")
	public List<Entry> getUnread(User user) {
		return getHibernateTemplate().find("FROM Entry e WHERE ? not in elements(e.readBy)", user);
	}

}
